import matplotlib.pyplot as plt
import numpy as np
plt.rcParams['font.sans-serif'] = ['SimHei']
x = [1, 2, 2, 1, 1]
y = [1, 1, 2, 2, 1]
plt.plot(x, y)
plt.title("直线")
plt.xlabel("X轴")
plt.ylabel("Y轴")
plt.show()